﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brain.Editor
{
    public static class ContentFileUtil
    {
        public static void InsertDefaultProcessors(string fileExtension, out string processor, out string importer)
        {
            string ext = fileExtension.ToLower();

            if (ext.Contains("png") || ext.Contains("tga") ||
                ext.Contains("jpg") || ext.Contains("jpeg"))
            {
                // Texture2D
                processor = "TextureProcessor";
                importer = "TextureImporter";
            }
            else if (ext.Contains("x") && ext.EndsWith("x"))
            {
                // Model
                processor = "ModelProcessor";
                importer = "XImporter";
            }
            else if (ext.Contains("fbx"))
            {
                processor = "ModelProcessor";
                importer = "FbxImporter";
            }
            else
            {
                processor = null;
                importer = null;
            }
        }
    }
}
